-- GENERATED SPELL FOR [Sunhawk Spy] --


function spell0_17604(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_17604', 30323, 1)
end

function spell1_17604(pUnit, Event) --@Heroic Strike,n/a--
pUnit:FullCastSpellOnTarget(31827,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17604', 541, 1)
end

function spell2_17604(pUnit, Event) --@Mark of the Sunhawk,n/a--
pUnit:FullCastSpellOnTarget(31734,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17604', 20269, 1)
end

function Sorts_17604(pUnit, Event)
local choix_sorts_17604 = math.random(0, 2)
if choix_sorts_17604 == 0 then
pUnit:RegisterEvent('spell0_17604', 1, 1)
end
if choix_sorts_17604 == 1 then
pUnit:RegisterEvent('spell1_17604', 1, 1)
end
if choix_sorts_17604 == 2 then
pUnit:RegisterEvent('spell2_17604', 1, 1)
end
end

function mob17604_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17604', math.random(1500, 3000), 1)
end

function mob17604_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17604_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17604_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17604, 1, 'mob17604_Action')
RegisterUnitEvent(17604, 2, 'mob17604_Leave')
RegisterUnitEvent(17604, 3, 'mob17604_Kill')
RegisterUnitEvent(17604, 4, 'mob17604_Die')
